package com.farm.quartz.Dao;

import com.farm.quartz.domain.BarData;
import com.farm.quartz.domain.Product;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ProductDao extends JpaRepository<Product, Integer> {
    
    @Query(value="SELECT type, COUNT(*) FROM haohao_product GROUP BY type", nativeQuery = true)
    List<Object[]> getGroupByType();

}
